package com.yuandian.management.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuandian.management.mapper.AgentThresholdMapper;
import com.yuandian.management.service.IAgentThresholdService;
import com.yuandian.management.vo.AgentThresholdPojo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * agent阀值表 服务实现类
 * </p>
 *
 * @author fucx
 * @since 2021-01-27
 */
@Service
public class AgentThresholdServiceImpl extends ServiceImpl<AgentThresholdMapper, AgentThresholdPojo> implements IAgentThresholdService {
	@Autowired
    private AgentThresholdMapper agentThresholdMapper;

	/**
     * 查询agent阀值信息表
     * 
     * @return
     */
    @Override
    public List<AgentThresholdPojo> queryList() {
        return agentThresholdMapper.queryList();
    }

    /**
     * 根据code获取阀值实体
     * 
     * @param thresholdCode
     * @return
     */
    @Override
    public AgentThresholdPojo queryAgentThresholdByCode(String thresholdCode) {
        return agentThresholdMapper.queryAgentThresholdByCode(thresholdCode);
    }

    /**
     * 根据Code更新阀值信息
     * 
     * @param threshold
     * @return
     */
    @Override
    public int updateByCodeSelective(AgentThresholdPojo threshold) {
        return agentThresholdMapper.updateByCodeSelective(threshold);
    }
}
